package com.janke.softballnexus.client.ui;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;

public class MainPage extends Composite {

	@UiField
	AppMenuBar appMenuBar;

	@UiField
	HTMLPanel content;

	// @UiHandler("createButton")
	// void onCreateClick(ClickEvent event) {
	// BagOfState.getInstance().getClientEventBus()
	// .fireEvent(new CreateDivision());
	// }
	//
	// @UiHandler("retrieveButton")
	// void onRetrieveClick(ClickEvent event) {
	// BagOfState.getInstance().getClientEventBus()
	// .fireEvent(new RetrieveAllDivisions());
	// }
	//
	// @UiHandler("updateButton")
	// void onUpdateClick(ClickEvent event) {
	// if (BagOfState.getInstance().getAllDivisions().size() == 0) {
	// Window.alert("No loaded divisions");
	// } else {
	// BagOfState
	// .getInstance()
	// .getClientEventBus()
	// .fireEvent(
	// new UpdateDivision(BagOfState.getInstance()
	// .getAllDivisions().iterator().next()));
	// }
	// }
	//
	// @UiHandler("deleteButton")
	// void onDeleteClick(ClickEvent event) {
	// BagOfState.getInstance().getClientEventBus()
	// .fireEvent(new DeleteAllDivisions());
	// }

	private static Binder uiBinder = GWT.create(Binder.class);

	interface Binder extends UiBinder<Widget, MainPage> {
	}

	public MainPage() {
		initWidget(uiBinder.createAndBindUi(this));
	}

}
